#ifndef SMART_CAR_SERVICES_REGISTRY
#define SMART_CAR_SERVICES_REGISTRY

#include "utils.h"
#include "logger.h"
#include "smart_car_services.h"
#include <interface\service_interface.h>
#include <map>

namespace smart_car
{
	class smart_car_service_registry;

	typedef utils::singltone<smart_car_service_registry> service_registry;

	class smart_car_service_registry
	{
	public:
		smart_car_service_registry();
		bool add(smart_car_services service_type, service_interface* service);
		void remove(smart_car_services service_type);
		service_interface* find(smart_car_services service_type);
		~smart_car_service_registry();
	private:
		typedef std::map<smart_car_services, service_interface*> service_map_t;
		service_map_t service_map;
		utils::logger logger;

	};
}

#endif /* SMART_CAR_SERVICES_REGISTRY */